'use strict';
// Copyright 2014 Blueant Inc. All Rights Reserved.

/**
 * @fileoverview 必须带$1参战
 * @author sundbcn@gmail.com (sun debing)
 */

var _ = require('lodash');

var CopyCondition = function () {

};

/**
 * 验证
 */
CopyCondition.prototype.getProgress = function (condition, record, damage_build_list, data) {
    var soldier_list = record.atk.soldier_list || [];
    var is_take = false;
    _.some(soldier_list, function (soldier_item) {
        if (soldier_item.soldier_type == condition.param1) {
            is_take = true;
            return true;
        }
    });

    return {
        progress: 0,
        total_progress: 0,
        is_pass: Number(is_take)
    };
};

module.exports = new CopyCondition();
